﻿using HandyControl.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.MessageDialog
{
    public class Dialog
    {

        private System.Windows.Window? DialogMessage;
        private bool OpenDialog_;
        /// <summary>
        /// 打开加载框
        /// </summary>
        public  bool OpenDialog
        {
            get { return OpenDialog_; }
            set { OpenDialog_ = value;
                if (value)
                {
                    DialogMessage = new DialogBase();
                    DialogMessage.Show();
                }
                else
                {
                    DialogMessage?.Close();  
                }         
            }
        }

        private bool OpenMessage_;
        /// <summary>
        /// 打开消息框
        /// </summary>
        //public bool OpenMessage
        //{
        //    get { return OpenMessage_; }
        //    set
        //    {
        //        OpenMessage_ = value;
        //        if (value)
        //        {
        //            DialogMessage = new Message();
        //            DialogMessage.ShowDialog();
        //        }
        //    }
        //}
        /// <summary>
        /// 打开消息框
        /// </summary>
        public void OpenMessage(string Message)
        {
            DialogMessage = new Message(Message);
            DialogMessage.ShowDialog();
        }
    }
}
